#include "stdio.h"
#include "log/log.h"
#include "string.h"
#include "app_run.h"
#include "ota_version.h"
#include "daemon_run.h"
int main(int argc, char const *argv[])
{
    if (argc < 2)
    {
        log_error("至少携带一个参数");
        return -1;
    }else if (strcmp(argv[1], "app") == 0)
    {
        app_run();
    }else if (strcmp(argv[1], "ota") == 0)
    {
        ota_version_checkupdateDaily();
    }else if (strcmp(argv[1], "daemon") == 0)
    {
        daemon_run();
    }
    else if (strcmp(argv[1], "version") == 0)
    {
        ota_version_printVersion();
    }
    else 
    {
        log_error("暂不支持");
        return -1;
    }
    
    return 0;
}

/**
 * gateway app
 * gateway ota
 * gateway daemon
 * gateway version
 */